package com.fau.wmbj.server.flowable.service.impl;


import com.fau.wmbj.server.flowable.entity.ActHiProcinst;
import com.fau.wmbj.server.flowable.repo.ActHiProcinstRepo;
import com.fau.wmbj.server.flowable.service.ActHiProcinstService;
import com.fau.wmbj.server.service.base.BaseServiceImpl;
import com.fau.wmbj.server.utils.Filter;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 流程实例Service业务层处理
 */
@RequiredArgsConstructor
@Service
public class ActHiProcinstServiceImpl extends BaseServiceImpl<ActHiProcinst, Long> implements ActHiProcinstService {

    private final ActHiProcinstRepo repo;

    /**
     * 按照业务id查询
     *
     * @param businessKeys 业务id
     */
    @Override
    public List<ActHiProcinst> selectByBusinessKeyIn(List<String> businessKeys) {

        return super.findList(Filter.in("businessKey", businessKeys));
    }

    /**
     * 按照业务id查询
     *
     * @param businessKey 业务id
     */
    @Override
    public ActHiProcinst selectByBusinessKey(String businessKey) {
        return super.findEntity(Filter.eq("businessKey", businessKey));
    }
}
